import numpy as np
import matplotlib.pyplot as plt
plt.figure(figsize=(6,4))
x = np.arange(1,6)
y = np.array([10,30,50,60,45])
plt.rcParams['font.sans-serif'] = 'SimHei'
plt.rcParams['axes.unicode_minus'] = False
plt.title('想喝',fontsize='16')
plt.xlabel('x',fontsize=16)
plt.ylabel('y',fontsize=16)
for a,b in zip(x,y):
    plt.text(x=a,y=b,s=b,fontsize=12,ha='left',va='center')
plt.grid(axis='both')
plt.plot(x,y)
plt.legend(labels='12')
plt.savefig('c:/练习.png')
plt.show()